home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Language/OS - Multiplatform Resource Library
/
LANGUAGE OS.iso
/
f2c
/
may_5_92.lha
/
f2c.VMay_5_1992
/
libF77
/
pow_ii.c
< prev
next >
Wrap
C/C++ Source or Header
|
1992-05-07
|
242b
|
26 lines
#include "f2c.h"
integer pow_ii(ap, bp)
integer *ap, *bp;
{
integer pow, x, n;
pow = 1;
x = *ap;
n = *bp;
if(n < 0)
{ }
else if(n > 0)
for( ; ; )
{
if(n & 01)
pow *= x;
if(n >>= 1)
x *= x;
else
break;
}
return(pow);
}